home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mobiclic 119
/
MOBICLIC 119.ISO
/
pc
/
DATA
/
DCV119
/
DCV119_01
/
DCV119_01.swf
/
scripts
/
frame_1
/
DoAction.as
Wrap
Text File
|
2009-11-16
|
58KB
|
2,245 lines
function xtrace(p)
{
var _loc3_ = typeof p != "string" ? "" + p.mess : "" + p;
var _loc5_ = p.group != undefined ? p.group : "tous";
if(xtraceGroups[_loc5_] == 1)
{
trace(_loc3_);
if(_global.xtrace_mode != "on")
{
return undefined;
}
var _loc4_ = new LocalConnection();
_loc4_.allowDomain = function(sendingDomain)
{
return true;
};
_loc4_.send("lc_name","AfficherTexte",_loc3_);
}
}
function xtrace_raz()
{
if(_global.xtrace_mode != "on")
{
return undefined;
}
var _loc2_ = new LocalConnection();
_loc2_.send("lc_name","RazTexte",mess);
}
function xlisteObj(p)
{
if(xlisteObj_mode != "on")
{
return undefined;
}
var _loc1_ = p.obj != undefined ? p.obj : p;
p.mess = p.mess != undefined ? p.mess : "";
xtrace({mess:"\r____________________" + p.mess + " " + _loc1_._name + "______________________",group:p.group});
for(props in _loc1_)
{
xtrace({mess:props + " = " + _loc1_[props],group:p.group});
}
xtrace({mess:"_________________________________________________\r",group:p.group});
}
function IncString(str, seuil)
{
var _loc2_ = str.split("_");
var _loc1_ = _loc2_.length - 1;
var _loc3_ = Number(_loc2_[_loc1_]) + 1;
while(_loc3_ > seuil)
{
_loc2_[_loc1_] = gimme2digits(0);
_loc1_ = _loc1_ - 1;
_loc3_ = Number(_loc2_[_loc1_]) + 1;
}
_loc2_[_loc1_] = gimme2digits(_loc3_);
return _loc2_.join("_");
}
function DecString(str)
{
var _loc1_ = str.split("_");
trace(_loc1_);
var _loc2_ = _loc1_.length - 1;
trace(Number(_loc1_[_loc2_]));
_loc1_[_loc2_] = gimme2digits(Number(_loc1_[_loc2_]) - 1);
return _loc1_.join("_");
}
function xGetConfig()
{
_root.xConfig = new Object();
_root.xConfig.Set = function(p)
{
if(_root.xConfig[p.nom] == undefined)
{
if(p.defaut != "OBLIGATOIRE")
{
_root.xConfig[p.nom] = p.defaut;
if(p.type == "number")
{
_root.xConfig[p.nom] = Number(_root.xConfig[p.nom]);
}
}
}
};
_root.xConfig._name = "xConfig";
var _loc2_ = _root.moduleInfo.returnNodeByPath("Module.Config.Params").childNodes;
for(props in _loc2_)
{
_root.xConfig[_loc2_[props].attributes.nom] = _loc2_[props].attributes.valeur;
}
}
function GetFilePath(fichier)
{
var _loc2_ = AntiSlashToSlash(fichier);
var _loc1_ = _loc2_.split("/");
_loc1_.pop();
return _loc1_.join("/");
}
function AntiSlashToSlash(chaine)
{
return str_replace(chaine,"\\","/");
}
function str_replace(str, search, replace)
{
return str.split(search).join(replace);
}
function JoindreObjets(objects)
{
var _loc2_ = new Object();
var _loc1_ = 0;
while(_loc1_ < objects.length)
{
p1 = objects[_loc1_];
for(props in p1)
{
_loc2_[props] = p1[props];
}
_loc1_ = _loc1_ + 1;
}
return _loc2_;
}
function GetOriginalSize(mc)
{
var _loc2_ = mc._rotation;
mc._rotation = 0;
var _loc3_ = {w:mc._width * mc._xscale / 100,h:mc._height * mc._yscale / 100};
mc._rotation = _loc2_;
return _loc3_;
}
function GetOriginalWidth(mc)
{
var _loc2_ = mc._rotation;
mc._rotation = 0;
var _loc3_ = mc._width * mc._xscale / 100;
var _loc4_ = mc._height * mc._yscale / 100;
mc._rotation = _loc2_;
return _loc3_;
}
function GetOriginalHeight(mc)
{
var _loc2_ = mc._rotation;
mc._rotation = 0;
var _loc4_ = mc._width * mc._xscale / 100;
var _loc3_ = mc._height * mc._yscale / 100;
mc._rotation = _loc2_;
return _loc3_;
}
function CreerCache(p)
{
var _loc4_ = p.level != undefined ? p.level : _global.Levels.cache;
var _loc2_ = p.mc.createEmptyMovieClip("CACHE",_loc4_);
_loc2_.beginFill(65280,50);
_loc2_.moveTo(0,0);
_loc2_.lineTo(p.width,0);
_loc2_.lineTo(p.width,p.height);
_loc2_.lineTo(0,p.height);
_loc2_.lineTo(0,0);
_loc2_.endFill();
p.mc.setMask(_loc2_);
}
function ConvertCoord(mc_src, mc_dest)
{
var _loc1_ = {x:0,y:0};
mc_src.localToGlobal(_loc1_);
mc_dest.globalToLocal(_loc1_);
return _loc1_;
}
function getGlobalCoord(xc, yc, mc)
{
var _loc1_ = {x:xc * 100 / mc._xscale,y:yc * 100 / mc._yscale};
mc.localToGlobal(_loc1_);
return _loc1_;
}
function getLocalCoord(xc, yc, mc)
{
var _loc1_ = new Object({x:xc,y:yc});
mc.globalToLocal(_loc1_);
_loc1_.x = _loc1_.x / 100 * mc._xscale;
_loc1_.y = _loc1_.y / 100 * mc._yscale;
return _loc1_;
}
function length_ass(arr)
{
var _loc1_ = 0;
for(prop in arr)
{
_loc1_ = _loc1_ + 1;
}
return _loc1_;
}
function ExplodeString(chaine)
{
var _loc3_ = new Array();
var _loc1_ = 0;
while(_loc1_ < chaine.length)
{
_loc3_.push(chaine.charAt(_loc1_));
_loc1_ = _loc1_ + 1;
}
return _loc3_;
}
function BloquerActives()
{
if(_global.ClipBloquant == undefined)
{
var _loc0_ = null;
var _loc2_ = _global.ClipBloquant = _MOD_.createEmptyMovieClip("ClipBloquant",10123);
_loc2_.attachMovie("ClipInvisible","ClipInvisible",2);
_loc2_._width = Stage.width;
_loc2_._height = Stage.height;
_loc2_._x = 0;
_loc2_._y = 0;
_loc2_.useHandCursor = false;
_loc2_.onPress = function()
{
};
}
}
function DebloquerActives()
{
if(_global.ClipBloquant != undefined)
{
removeMovieClip(_global.ClipBloquant);
_global.ClipBloquant = undefined;
}
}
function afficheLM_x2(p)
{
viderLM_x2();
_root.gereTextes.afficheLM({codeLM:p.codeLM,X:p.LMrep._x,Y:p.LMrep._y,width:p.LMrep._width,height:p.LMrep._height});
LMaVider2.push(p);
}
function viderLM_x2()
{
var _loc3_ = 0;
while(_loc3_ < _global.LMaVider2.length)
{
_root.gereTextes.masqueLM(_global.LMaVider2[_loc3_]);
_loc3_ = _loc3_ + 1;
}
}
function afficheLM_x(p)
{
_root.gereTextes.afficheLM({codeLM:p.codeLM,X:p.LMrep._x - p.width / 2,Y:p.LMrep._y - p.height / 2,width:p.width,height:p.height});
_global.LMaVider.push(p);
}
function viderLM_x()
{
var _loc3_ = 0;
while(_loc3_ < _global.LMaVider.length)
{
_root.gereTextes.masqueLM(_global.LMaVider[_loc3_]);
_loc3_ = _loc3_ + 1;
}
}
function InitMC(p)
{
trace("initMC " + p.mc);
var mc = typeof p != "movieclip" ? p.mc : p;
if(p.level != undefined)
{
var ceMC_name_old = mc._name + "_old";
var ceMC_name = mc._name;
mc._name = ceMC_name_old;
mc.duplicateMovieClip(ceMC_name,p.level);
mc._visible = false;
mc = this[ceMC_name];
}
var fonction = p.fonction != undefined ? eval("InitMC_" + p.fonction) : InitMC_standart;
mc.InitMC = fonction;
mc.InitMC(p);
}
function InitMC_standart(p)
{
if(p.IB != undefined)
{
if(typeof p.IBrep == "movieclip")
{
var IBrepere = p.IBrep;
}
else if(p.IBrep == true)
{
var IBrepere = _MOD_["IBrep_" + p.IB];
}
else
{
var IBrepere = p.mc;
}
this.afficheIB = function()
{
_MOD_.gereTextes.afficheIB({codeIB:p.IB,mc:IBrepere});
};
this.masqueIB = function()
{
_MOD_.gereTextes.masqueIB();
};
}
this.reposFrame = p.reposFrame != undefined ? p.reposFrame : "E1";
this.pressFrame = p.pressFrame != undefined ? p.pressFrame : "E2";
this.overFrame = p.overFrame != undefined ? p.overFrame : "E2";
this.outFrame = p.outFrame != undefined ? p.outFrame : "E1";
this.releaseFrame = p.releaseFrame != undefined ? p.releaseFrame : "E1";
this.releaseOutFrame = p.releaseOutFrame != undefined ? p.releaseOutFrame : "E1";
this.activeFrame = p.activeFrame != undefined ? p.activeFrame : undefined;
this.desactiveFrame = p.desactiveFrame != undefined ? p.desactiveFrame : undefined;
if(p.reposFrame != undefined)
{
this.gotoAndStop(p.reposFrame);
}
this.p = p;
§§push(this);
§§push("joueson");
if(p.son == undefined)
{
§§push(undefined);
}
§§pop()[§§pop()] = §§pop();
§§push(this);
§§push("stopson");
if(p.nostop != undefined)
{
§§push(undefined);
}
§§pop()[§§pop()] = §§pop();
if(p.sonOnPress != undefined)
{
this.sonOnPress = p.sonOnPress;
this.sonOnPress_offset = p.sonOnPress_offset != undefined ? Number(p.sonOnPress_offset) : 0;
this.sonOnPress_loopSon = p.sonOnPress_loopSon != undefined ? Number(p.sonOnPress_loopSon) : 0;
this.jouesonOnPress = function()
{
joueBruitage({nomSon:this.sonOnPress,offset:this.sonOnPress_offset,loopSon:this.sonOnPress_loopSon});
};
this.stopsonOnPress = function()
{
stopBruitage({nomSon:this.sonOnPress});
};
}
else
{
this.jouesonOnMove = undefined;
this.stopsonOnMove = undefined;
}
this.curseur_after_press = p.goto != undefined ? "fleche" : "doigt";
this.curseur_after_press = p.curseurAfterPress != undefined ? p.curseurAfterPress : "doigt";
this.goto = p.goto;
this.Activer = function()
{
if(this.Actif == true)
{
return undefined;
}
this.enabled = true;
this.BTN.enabled = true;
this.Actif = true;
this.gotoAndStop(this.activeFrame);
};
this.Desactiver = function()
{
if(this.Actif == false)
{
return undefined;
}
this.enabled = false;
this.BTN.enabled = false;
this.Actif = false;
this.stopsonOnPress();
this.masqueIB();
this.gotoAndStop(this.desactiveFrame);
};
this.Activer();
this.GS = this.gotoAndStop;
this.MConPress = function()
{
if(this.p.blockOnPress == true)
{
this.enabled = false;
}
this.stopson();
this.jouesonOnPress();
this.masqueIB();
this.gotoAndStop(this.pressFrame);
gereCursor(this.curseur_after_press);
_root.gotoAndStop(this.goto);
var p = this.OnPress();
};
this.MConRollOver = function()
{
this.joueson();
this.afficheIB();
this.gotoAndStop(this.overFrame);
gereCursor("doigt");
var _loc2_ = this.OnRollOver();
};
this.MConRollOut = function()
{
this.stopson();
this.masqueIB();
this.gotoAndStop(this.outFrame);
gereCursor("fleche");
var _loc2_ = this.OnRollOut();
};
this.MConRelease = function()
{
this.gotoAndStop(this.releaseFrame);
gereCursor("doigt");
var _loc2_ = this.OnRelease();
};
this.MConReleaseOutside = function()
{
this.gotoAndStop(this.releaseOutFrame);
gereCursor("fleche");
var _loc2_ = this.OnReleaseOutside();
};
if(p.BTN != true)
{
this.onPress = this.MConPress;
this.onRollOver = this.MConRollOver;
this.onRollOut = this.MConRollOut;
this.onRelease = this.MConRelease;
this.onReleaseOutside = this.MConReleaseOutside;
}
else
{
this.BTN.onPress = function()
{
this._parent.MConPress();
};
this.BTN.onRollOver = function()
{
this._parent.MConRollOver();
};
this.BTN.onRollOut = function()
{
this._parent.MConRollOut();
};
this.BTN.onRelease = function()
{
this._parent.MConRelease();
};
this.BTN.onReleaseOutside = function()
{
this._parent.MConReleaseOutside();
};
}
}
function InitMC_BTN(p)
{
if(p.IB != undefined)
{
if(p.IBrep == true)
{
var IBrepere = _MOD_["IBrep_" + p.IB];
}
else
{
var IBrepere = p.mc;
}
this.afficheIB = function()
{
gereTextes.afficheIB({codeIB:p.IB,mc:IBrepere});
};
this.masqueIB = function()
{
gereTextes.masqueIB();
};
}
this.enabled = true;
§§push(this);
§§push("joueson");
if(p.son == undefined)
{
§§push(undefined);
}
§§pop()[§§pop()] = §§pop();
§§push(this);
§§push("stopson");
if(p.nostop != undefined)
{
§§push(undefined);
}
§§pop()[§§pop()] = §§pop();
var curseur_after_press = p.goto != undefined ? "fleche" : "doigt";
this.goto = p.goto;
this.BTN.onPress = function()
{
this._parent.stopson();
this._parent.masqueIB();
this._parent.gotoAndStop("E3");
gereCursor(curseur_after_press);
_root.gotoAndStop(this.goto);
var _loc3_ = this._parent.OnPress();
};
this.BTN.onRollOver = function()
{
this._parent.joueson();
this._parent.afficheIB();
this._parent.gotoAndStop("E2");
gereCursor("doigt");
var _loc2_ = this._parent.OnRollOver();
};
this.BTN.onRollOut = function()
{
this._parent.stopson();
this._parent.masqueIB();
this._parent.gotoAndStop("E1");
gereCursor("fleche");
var _loc2_ = this._parent.OnRollOut();
};
this.BTN.onRelease = function()
{
this._parent.gotoAndStop("E2");
gereCursor("doigt");
var _loc2_ = this._parent.OnRelease();
};
this.BTN.onReleaseOutside = function()
{
this._parent.gotoAndStop("E1");
gereCursor("fleche");
var _loc2_ = this._parent.OnReleaseOutside();
};
}
function InitMC_dragdrop(p)
{
xtrace("InitMC");
if(p.IB != undefined)
{
if(p.IBrep == true)
{
var IBrepere = _MOD_["IBrep_" + p.IB];
}
else
{
var IBrepere = p.mc;
}
this.afficheIB = function()
{
gereTextes.afficheIB({codeIB:p.IB,mc:IBrepere});
};
this.masqueIB = function()
{
gereTextes.masqueIB();
};
}
this.pDepth = this.getDepth();
this.pressFrame = p.pressFrame != undefined ? p.pressFrame : "E3";
§§push(this);
§§push("joueson");
if(p.son == undefined)
{
§§push(undefined);
}
§§pop()[§§pop()] = §§pop();
§§push(this);
§§push("stopson");
if(p.son == undefined)
{
§§push(undefined);
}
§§pop()[§§pop()] = §§pop();
§§push(this);
§§push("jouesonOnPress");
if(p.son == undefined)
{
§§push(undefined);
}
§§pop()[§§pop()] = §§pop();
§§push(this);
§§push("stopsonOnPress");
if(p.son == undefined)
{
§§push(undefined);
}
§§pop()[§§pop()] = §§pop();
§§push(this);
§§push("jouesonOnOverCible");
if(p.son == undefined)
{
§§push(undefined);
}
§§pop()[§§pop()] = §§pop();
§§push(this);
§§push("stopsonOnOverCible");
if(p.son == undefined)
{
§§push(undefined);
}
§§pop()[§§pop()] = §§pop();
var _loc5_ = p.goto != undefined ? "fleche" : "doigt";
this.goto = p.goto;
this.DetectDrag = function()
{
this._x = _xmouse - this.ecart_mousex;
this._y = _ymouse - this.ecart_mousey;
this.CiblesTouchees = [];
var _loc2_ = 0;
while(_loc2_ < this.CiblesDrag.length)
{
if(this.hitTest(this.CiblesDrag[_loc2_]))
{
this.CiblesDrag[_loc2_].gotoAndStop("E3");
this.CiblesTouchees.push(this.CiblesDrag[_loc2_]);
this.touche = this.touche + 1;
}
else
{
this.CiblesDrag[_loc2_].gotoAndStop("E1");
}
_loc2_ = _loc2_ + 1;
}
if(this.touche == 1)
{
this.jouesonOnOverCible();
}
if(this.CiblesTouchees.length <= 0)
{
this.touche = 0;
this.stopsonOnOverCible();
}
this.PendantDrag();
};
this.StartDrag = function()
{
this.ecart_mousex = _xmouse - this._x;
this.ecart_mousey = _ymouse - this._y;
this.IntervalId = setInterval(mx.utils.Delegate.create(this,this.DetectDrag),10);
this.swapDepths(15800);
};
this.ComeBack = function()
{
this._x = this.xOri;
this._y = this.yOri;
this.gotoAndStop("E1");
};
this.onPress = function()
{
this.jouesonOnPress();
this.xOri = this._x;
this.yOri = this._y;
this.masqueIB();
this.gotoAndStop(this.pressFrame);
gereCursor("mainF");
this.StartDrag();
var _loc2_ = this.OnPress();
};
this.onRollOver = function()
{
this.joueson();
this.afficheIB();
this.gotoAndStop("E2");
gereCursor("mainO");
var _loc2_ = this.OnRollOver();
};
this.onRollOut = function()
{
this.stopson();
this.gotoAndStop("E1");
this.masqueIB();
gereCursor("fleche");
var _loc2_ = this.OnRollOut();
};
this.onRelease = function()
{
gereCursor("mainO");
this.stopsonOnPress();
this.gotoAndStop("E2");
clearInterval(this.IntervalId);
this.CiblesTouchees = [];
var _loc2_ = 0;
while(_loc2_ < this.CiblesDrag.length)
{
if(this.hitTest(this.CiblesDrag[_loc2_]))
{
_;
this.CiblesTouchees.push(this.CiblesDrag[_loc2_]);
}
_loc2_ = _loc2_ + 1;
}
this.swapDepths(this.pDepth);
this.ApresDrag();
var _loc3_ = this.OnRelease();
};
this.onReleaseOutside = this.onRelease;
}
function InitMC_slider(p)
{
if(p.IB != undefined)
{
if(p.IBrep == true)
{
var IBrepere = _MOD_["IBrep_" + p.IB];
}
else
{
var IBrepere = p.mc;
}
this.afficheIB = function()
{
gereTextes.afficheIB({codeIB:p.IB,mc:IBrepere});
};
this.masqueIB = function()
{
gereTextes.masqueIB();
};
}
§§push(this);
§§push("joueson");
if(p.son == undefined)
{
§§push(undefined);
}
§§pop()[§§pop()] = §§pop();
§§push(this);
§§push("stopson");
if(p.son == undefined)
{
§§push(undefined);
}
§§pop()[§§pop()] = §§pop();
var _loc6_ = p.goto != undefined ? "fleche" : "doigt";
this.goto = p.goto;
this.EnMouvement = false;
if(p.sonOnMove != undefined)
{
this.sonOnMove = p.sonOnMove;
this.sonOnMove_offset = p.sonOnMove_offset != undefined ? Number(p.sonOnMove_offset) : 0;
this.sonOnMove_loopSon = p.sonOnMove_loopSon != undefined ? Number(p.sonOnMove_loopSon) : 0;
this.jouesonOnMove = function()
{
joueBruitage({nomSon:this.sonOnMove,offset:this.sonOnMove_offset,loopSon:this.sonOnMove_loopSon});
};
this.stopsonOnMove = function()
{
stopBruitage({nomSon:this.sonOnMove});
};
}
else
{
this.jouesonOnMove = undefined;
this.stopsonOnMove = undefined;
}
if(p.sonOnPress != undefined)
{
this.sonOnPress = p.sonOnPress;
this.sonOnPress_offset = p.sonOnPress_offset != undefined ? Number(p.sonOnPress_offset) : 0;
this.sonOnPress_loopSon = p.sonOnPress_loopSon != undefined ? Number(p.sonOnPress_loopSon) : 0;
this.jouesonOnPress = function()
{
joueBruitage({nomSon:this.sonOnPress,offset:this.sonOnPress_offset,loopSon:this.sonOnPress_loopSon});
};
this.stopsonOnPress = function()
{
stopBruitage({nomSon:this.sonOnPress});
};
}
else
{
this.jouesonOnMove = undefined;
this.stopsonOnMove = undefined;
}
this.DragZone = {left:this._x,right:this._x + p.DragZoneLargeur,top:this._y,bottom:this._y};
this.DragZoneLargeur = p.DragZoneLargeur;
this.DragZoneLargeur_pourcent = p.DragZoneLargeur / 100;
this.SetPosition = function(pourcent)
{
this._x = this.DragZone.left + this.DragZoneLargeur_pourcent * pourcent;
};
this.GetPosition = function()
{
return (this._x - this.DragZone.left) / this.DragZoneLargeur_pourcent;
};
this.DetectDrag = function()
{
this._x = _root._xmouse - this.ecart_mousex;
this._y = _root._ymouse - this.ecart_mousey;
if(this._x <= this.DragZone.left)
{
this._x = this.DragZone.left;
}
if(this._y < this.DragZone.top)
{
this._y = this.DragZone.top;
}
if(this._x >= this.DragZone.right)
{
this._x = this.DragZone.right;
}
if(this._y > this.DragZone.bottom)
{
this._y = this.DragZone.bottom;
}
updateAfterEvent();
if(this._x == this.lastx && this._y == this.lasty)
{
if(this.EnMouvement == true)
{
this.EnMouvement = false;
this.stopsonOnMove();
}
}
else if(this.EnMouvement == false)
{
this.EnMouvement = true;
this.jouesonOnMove();
}
this.lastx = this._x;
this.lasty = this._y;
this.PendantSlide();
};
this.StartDrag = function()
{
this.ecart_mousex = _root._xmouse - this._x;
this.ecart_mousey = _root._ymouse - this._y;
this.lastx = this._x;
this.lasty = this._y;
this.IntervalId = setInterval(mx.utils.Delegate.create(this,this.DetectDrag),1);
};
this.onPress = function()
{
this.jouesonOnPress();
this.masqueIB();
this.gotoAndStop("E3");
gereCursor("mainF");
this.StartDrag();
var _loc2_ = this.OnPress();
};
this.onRollOver = function()
{
this.joueson();
this.afficheIB();
this.gotoAndStop("E2");
gereCursor("mainO");
var _loc2_ = this.OnRollOver();
};
this.onRollOut = function()
{
this.stopson();
this.stopsonOnPress();
this.stopsonOnMove();
this.gotoAndStop("E1");
this.masqueIB();
gereCursor("fleche");
var _loc2_ = this.OnRollOut();
};
this.onRelease = function()
{
this.gotoAndStop("E2");
clearInterval(this.IntervalId);
this.stopson();
this.stopsonOnPress();
this.stopsonOnMove();
gereCursor("mainO");
var _loc2_ = this.OnRelease();
};
this.onReleaseOutside = function()
{
this.onRelease();
gereCursor("fleche");
var _loc2_ = this.OnReleaseOutside();
};
}
function InitMC_titre(p)
{
this.LMaVider = [];
this.offsetx = p.offsetx != undefined ? Number(p.offsetx) : 0;
this.offsety = p.offsety != undefined ? Number(p.offsety) : 0;
this.ChangeTexte = function(p)
{
this.viderLM();
_root.gereTextes.afficheLM({codeLM:p.codeLM,X:this._x + this.offsetx,Y:this._y + this.offsety,width:this._width,height:this._height});
this.LMaVider.push(p);
};
this.viderLM = function()
{
var _loc3_ = 0;
while(_loc3_ < this.LMaVider.length)
{
_root.gereTextes.masqueLM(this.LMaVider[_loc3_]);
_loc3_ = _loc3_ + 1;
}
};
}
function initKeyPause()
{
gPauseOn = 0;
gPauseSpaceOn = 0;
gPauseSpaceEnCours = 0;
}
function initGen()
{
this._lockroot = true;
_global.gClipGen = this;
Stage.showMenu = false;
gLangue = "FR";
gMusicOn = 1;
gSousTitre = 0;
gST = 0;
gVolume = 100;
gWidth = moduleInfo.returnNodeByPath("BackOffice").firstChild.attributes.width;
gHeight = moduleInfo.returnNodeByPath("BackOffice").firstChild.attributes.height;
if(gWidth == undefined)
{
gWidth = 800;
}
else
{
gWidth = Number(gWidth);
}
if(gHeight == undefined)
{
gHeight = 600;
}
else
{
gHeight = Number(gHeight);
}
initKeyPause();
}
function testeDebutCommentSpecial()
{
switch(gCommentOn.id.split("_")[gCommentOn.id.split("_").length - 1])
{
case "bz":
case "BZ":
trace("------- BZ on-----------");
DesactiveBZ();
if(BT_BZ.gEtat !== 3)
{
BT_BZ.gotoAndPlay("E3");
}
else
{
BT_BZ.BZ_P.gotoAndPlay("parle");
}
}
}
function testeFinCommentSpecial()
{
switch(gCommentOn.id.split("_")[gCommentOn.id.split("_").length - 1])
{
case "bz":
case "BZ":
trace("------- BZ off-----------");
ActiveBZ();
BT_BZ.BZ_P.gotoAndPlay("rentre");
BT_BZ.gClicOn = undefined;
}
}
function stopComment()
{
if(gCommentOn !== undefined)
{
testeFinCommentSpecial();
delete gCommentOn.onSoundComplete;
gCommentOn.stop();
gCommentOn = undefined;
if(gPauseOn == undefined || gPauseOn == 0)
{
removeMovieClip("mcClicZap");
}
gBlockST = undefined;
gereTextes.masqueST();
if(gClipTarget !== undefined)
{
gClipTarget.gotoAndStop(gClipTargetLabel);
gClipTarget = undefined;
gClipTargetLabel = undefined;
}
}
}
function pauseComment()
{
trace("pauseComment " + gCommentOn);
if(gCommentOn !== undefined)
{
gCommentOn.stop();
mcClicZap._visible = false;
}
}
function continueComment()
{
trace("continueComment " + gCommentOn);
if(gCommentOn !== undefined)
{
gCommentOn.start(gCommentOn.position / 1000);
mcClicZap._visible = true;
}
}
function joueSon(p)
{
var _loc4_ = p.nomSon;
gSoundString = _loc4_;
if(p.mc !== undefined)
{
gClipRef = p.mc;
}
else
{
gClipRef = _root;
}
if(p.zapBlock !== undefined)
{
gClicZap = p.zapBlock;
}
else
{
gClicZap = "ZAP_BLOCK";
}
if(p.actionFin !== undefined)
{
gActionFinSon = p.actionFin;
}
else
{
gActionFinSon = "PLAY";
}
stopComment();
if(p.mcCible !== undefined)
{
if(typeof p.mcCible == "movieclip")
{
gClipTarget = p.mcCible;
}
else
{
gClipTarget = gClipRef[p.mcCible];
}
if(p.mcLabelOut !== undefined)
{
gClipTargetLabel = p.mcLabelOut;
}
else
{
gClipTargetLabel = gClipTarget._currentframe;
}
if(p.mcLabelIn !== undefined)
{
gClipTarget.gotoAndPlay(p.mcLabelIn);
}
else
{
gClipTarget.gotoAndPlay("parle");
}
}
mySound = soundObjects[gCommentName + _loc4_];
if(mySound !== undefined)
{
gCommentOn = mySound;
gCommentOn.p = p;
gCommentOn.id = gCommentName + _loc4_;
testeDebutCommentSpecial();
if(gMusicOn == 1 && gMusic !== undefined)
{
soundObjects[gMusic].setVolume(gVolume * 40 / 100);
}
mySound.setVolume(gVolume);
if(gCommentOnPausePos !== undefined)
{
mySound.start(gCommentOnPausePos / 1000);
}
else
{
mySound.start();
}
}
else
{
trace("______" + getSoundByID(gCommentName + _loc4_));
var _loc5_ = getSoundByID(gCommentName + _loc4_);
if(_loc5_ !== undefined)
{
mySound = new Sound();
mySound.loadSound(_global.gModulePath + _loc5_.attributes.src,true);
gCommentOn = mySound;
gCommentOn.p = p;
gCommentOn.id = gCommentName + _loc4_;
testeDebutCommentSpecial();
if(gMusicOn == 1 && gMusic !== undefined)
{
soundObjects[gMusic].setVolume(gVolume * 40 / 100);
}
}
}
if(mySound == undefined)
{
return undefined;
}
mySound.onSoundComplete = commentFini;
if(gClicZap !== "NOZAP_NOBLOCK")
{
mcClicZap = creerRectangle({nom:"mcClicZap",pere:_root,level:15000,width:gWidth,height:gHeight,x:0,y:0,alpha:0});
switch(gClicZap.split("_")[0])
{
case "ZAP":
mcClicZap.useHandCursor = false;
mcClicZap.onPress = function()
{
trace("clic zap son");
stopSon();
};
break;
case "NOZAP":
mcClicZap.useHandCursor = false;
mcClicZap.onPress = function()
{
trace("no clic allowed");
};
}
mcClicZap._visible = true;
}
if(gST == 1 && gBlockST == undefined)
{
gereTextes.afficheST(gCommentName + _loc4_);
}
}
function creerClicZap(p)
{
if(_global.mcClicZap2 != undefined)
{
removeMovieClip(_root.mcClicZap2);
}
var _loc0_ = null;
var _loc4_ = _global.mcClicZap2 = creerRectangle({nom:"mcClicZap2",pere:_root,level:15001,width:gWidth,height:gHeight,x:0,y:0,alpha:0});
_loc4_.p = p;
_loc4_.useHandCursor = false;
_loc4_.onPress = function()
{
trace("clic zap " + this.p);
this.p.retour.call(this.p.ecouteur);
removeMovieClip(this);
_global.mcClicZap2 = undefined;
};
_loc4_._visible = true;
}
function creerRectangle(p)
{
var _loc3_ = p.level != undefined ? p.level : 15000;
var _loc4_ = p.nom != undefined ? p.nom : "ClipSansNom";
var _loc5_ = p.alpha != undefined ? p.alpha : 100;
var _loc2_ = p.pere.createEmptyMovieClip(_loc4_,_loc3_);
_loc2_.beginFill(65280,_loc5_);
_loc2_.moveTo(p.x,p.y);
_loc2_.lineTo(p.x + p.width,p.y);
_loc2_.lineTo(p.x + p.width,p.y + p.height);
_loc2_.lineTo(p.x,p.y + p.height);
_loc2_.lineTo(p.x,p.y);
_loc2_.endFill();
return _loc2_;
}
function stopSon()
{
gCommentOn.stop();
commentFini();
}
function commentFini()
{
testeFinCommentSpecial();
if(gClicZap !== "NOZAP_NOBLOCK")
{
removeMovieClip("mcClicZap");
}
gCommentOn = undefined;
gBlockST = undefined;
gereTextes.masqueST();
if(gMusicOn == 1 && gMusic !== undefined)
{
soundObjects[gMusic].setVolume(gVolume);
}
if(gClipTarget !== undefined)
{
gClipTarget.gotoAndStop(gClipTargetLabel);
gClipTarget = undefined;
gClipTargetLabel = undefined;
}
switch(gActionFinSon)
{
case "RIEN":
break;
case "PLAY":
if(_root.gNextLabel == undefined)
{
if(gLineaireOn != undefined)
{
if((_loc0_ = gLineaireOn) !== "_")
{
lSonSuivant = gLineaireOn + gimme2digits(Number(gSoundString.split("_")[gSoundString.split("_").length - 1]) + 1);
lLabel = lSonSuivant;
}
else
{
lSonSuivant = gimme2digits(Number(gSoundString.split("_")[gSoundString.split("_").length - 1]) + 1);
lLabel = gLineaireOn + lSonSuivant;
}
joueSon({mc:gClipRef,nomSon:lSonSuivant,zapBlock:gClicZap,actionFin:gActionFinSon});
gClipRef.gotoAndStop(lLabel);
}
else
{
gClipRef.play();
}
}
else
{
gClipRef.gotoAndPlay(_root.gNextLabel);
_root.gNextLabel = undefined;
gLineaireOn = undefined;
}
break;
default:
_root[gActionFinSon]();
}
}
function joueBruitage(p)
{
trace("joueBruitage " + p.nomSon + " " + gVolume);
var _loc2_ = soundObjects[gBruitageName + p.nomSon];
if(gListeBruitage == undefined)
{
gListeBruitage = [];
gListeA_fin_Bruitage = [];
gListeLoop_Bruitage = [];
}
_loc2_.setVolume(gVolume);
_loc2_.id = p.nomSon;
gListeBruitage.push(_loc2_.id);
if(p.actionFin !== undefined)
{
gActionFinBruitage = p.actionFin;
gListeA_fin_Bruitage.push(gActionFinBruitage);
}
else
{
gActionFinBruitage = undefined;
gListeA_fin_Bruitage.push("");
}
_loc2_.p = p;
_loc2_.onSoundComplete = mx.utils.Delegate.create(_loc2_,finBruitage);
if(p.loopSon == undefined)
{
_loc2_.start(p.offset);
gListeLoop_Bruitage.push("");
}
else
{
_loc2_.start(p.offset,p.loopSon);
gListeLoop_Bruitage.push(p.loopSon);
}
}
function stopBruitage(p)
{
var _loc1_ = soundObjects[gBruitageName + p.nomSon];
finBruitage(p.nomSon);
_loc1_.stop();
}
function finBruitage(lSon)
{
if(lSon == undefined)
{
lSon = this.id;
}
if(gListeBruitage !== undefined)
{
if(getPos(gListeBruitage,lSon) !== -1)
{
if(gListeA_fin_Bruitage[getPos(gListeBruitage,lSon)] !== "")
{
if(typeof gListeA_fin_Bruitage[getPos(gListeBruitage,lSon)] == "string")
{
gClipGen[gListeA_fin_Bruitage[getPos(gListeBruitage,lSon)]]();
}
else
{
gListeA_fin_Bruitage[getPos(gListeBruitage,lSon)].call(this.p.MC);
}
}
gListeA_fin_Bruitage.splice(getPos(gListeBruitage,lSon),1);
gListeLoop_Bruitage.splice(getPos(gListeBruitage,lSon),1);
gListeBruitage.splice(getPos(gListeBruitage,lSon),1);
if(gListeBruitage.length == 0)
{
gListeBruitage = undefined;
gListeA_fin_Bruitage = undefined;
gListeLoop_Bruitage = undefined;
}
}
}
}
function getPos(myList, myValue)
{
lPresent = -1;
maPosition = 0;
while(maPosition <= myList.length)
{
if(myList[maPosition] == myValue)
{
lPresent = maPosition;
break;
}
maPosition++;
}
return lPresent;
}
function trouvePosMax(myList)
{
lMax = myList[0];
lPosMax = 0;
i = 1;
while(i <= myList.length)
{
if(myList[i] > lMax)
{
lMax = myList[i];
lPosMax = i;
}
i++;
}
return lPosMax;
}
function duplicate(myList)
{
newList = [];
i = 0;
while(i <= myList.length - 1)
{
newList.push(myList[i]);
i++;
}
return newList;
}
function randomiseList(myList)
{
var _loc3_ = duplicate(myList);
var _loc4_ = [];
var _loc5_ = _loc3_.length;
var _loc2_ = 0;
while(_loc2_ < _loc5_)
{
var _loc1_ = randomValue(0,_loc3_.length - 1);
_loc4_.push(_loc3_[_loc1_]);
_loc3_.splice(_loc1_,1);
_loc2_ = _loc2_ + 1;
}
return _loc4_;
}
function returnNodeByPathRandomise(nodeSent)
{
var _loc4_ = new XML();
var _loc5_ = nodeSent.childNodes.length;
var _loc1_ = 0;
while(_loc1_ < _loc5_)
{
var _loc2_ = randomValue(0,nodeSent.childNodes.length - 1);
_loc4_.appendChild(nodeSent.childNodes[_loc2_]);
_loc1_ = _loc1_ + 1;
}
return _loc4_;
}
function zapIntro(myLabel)
{
mcClicZapIntro = creerRectangle({nom:"mcClicZapIntro",pere:_root,level:15000,width:gWidth,height:gHeight,x:0,y:0,alpha:0});
mcClicZapIntro.useHandCursor = false;
mcClicZapIntro.onPress = function()
{
stopComment();
gotoAndPlay(myLabel);
removeZapIntro();
};
}
function removeZapIntro()
{
removeMovieClip(mcClicZapIntro);
}
function onMcOut(myMc)
{
gereCursor(1);
if(myMc.pLabelOut == undefined)
{
myMc.gotoAndPlay("E1");
}
else
{
myMc.gotoAndPlay(myMc.pLabelOut);
}
if(myMc.pSon.split("")[0] == "B")
{
stopBruitage({nomSon:myMc.pSon});
}
else
{
stopComment();
}
if(myMc.pIB !== undefined)
{
gereTextes.masqueIB();
}
}
function onMcOver(p)
{
var myMc = p.mc;
myMc.pIB = p.codeIB;
myMc.pX = p.X;
myMc.pY = p.Y;
if(p.nomSon == undefined)
{
if(p.nomSonC == undefined)
{
myMc.pSon = "B_" + myMc._name.split("_")[1];
}
else
{
myMc.pSon = p.nomSonC;
}
}
else
{
myMc.pSon = p.nomSon;
}
if(p.actionFin == undefined)
{
myMc.actionFin = "RIEN";
}
else
{
myMc.actionFin = p.actionFin;
}
myMc.pLabelOut = p.mcLabelOut;
myMc.onRollOver = function()
{
gereCursor(2);
if(p.mcLabelIn == undefined)
{
this.gotoAndPlay("E2");
}
else
{
this.gotoAndPlay(p.mcLabelIn);
}
if(this.pSon.split("")[0] == "B")
{
joueBruitage({nomSon:this.pSon});
}
else
{
joueSon({nomSon:this.pSon,zapBlock:"NOZAP_NOBLOCK",actionFin:this.actionFin});
}
if(this.pIB !== undefined)
{
if(this.pX !== undefined)
{
gereTextes.afficheIB({codeIB:this.pIB,X:this.pX,Y:this.pY});
}
else
{
gereTextes.afficheIB({mc:this,codeIB:this.pIB});
}
}
};
myMc.onRollOut = myMc.onDragOut = function()
{
onMcOut(myMc);
};
}
function desactiveClip(pClip)
{
trace(pClip);
delete pClip.onRollOver;
delete pClip.onRollOut;
delete pClip.onDragOut;
delete pClip.onPress;
delete pClip.onRelease;
delete pClip.onReleaseOutside;
}
function afficheClipPos(myMc, myX, myY)
{
myMc._x = myX;
myMc._y = myY;
myMc._visible = true;
}
function gimme2digits(X)
{
if(Number(X) < 10)
{
lX = "0" + Number(X);
}
else
{
lX = String(X);
}
return lX;
}
function randomValue(min, max)
{
var _loc1_ = Math.floor(Math.random() * (max - min + 1)) + min;
return _loc1_;
}
function chercheDepthPlus(myMc, myDepth)
{
var _loc1_ = myDepth;
while(_loc1_ < 17000)
{
if(myMc.getInstanceAtDepth(_loc1_) == undefined)
{
break;
}
_loc1_ = _loc1_ + 1;
}
return _loc1_;
}
function chercheDepthMoins(myMc, myDepth)
{
var _loc1_ = myDepth;
while(_loc1_ > -16383)
{
if(myMc.getInstanceAtDepth(_loc1_) == undefined)
{
break;
}
_loc1_ = _loc1_ - 1;
}
return _loc1_;
}
function changeST(myST)
{
trace("changeST : " + myST);
if(myST == "1")
{
gST = 1;
if(gCommentOn !== undefined)
{
gereTextes.afficheST(gCommentOn.id);
}
}
else
{
sousTitre = 0;
gST = 0;
gereTextes.masqueST(this);
}
}
function changeMusicOn(myChangeMusicOn)
{
trace("changeMusicOn : " + myChangeMusicOn);
switch(String(myChangeMusicOn))
{
case "1":
gMusicOn = 1;
if(gMusic == undefined)
{
gMusic = gBruitageName + "MU";
}
trace("changeMusicOn2 : " + gMusic + " - " + gVolume);
if(gCommentOn !== undefined)
{
soundObjects[gMusic].setVolume(gVolume * 0.4);
}
else
{
soundObjects[gMusic].setVolume(gVolume);
}
soundObjects[gMusic].start(0,1000);
break;
case "0":
soundObjects[gMusic].stop();
gMusicOn = 0;
break;
default:
if(gMusic !== undefined)
{
soundObjects[gMusic].stop();
}
gMusic = gBruitageName + myChangeMusicOn;
if(gMusicOn == 1)
{
if(gCommentOn !== undefined)
{
soundObjects[gMusic].setVolume(gVolume * 0.4);
}
else
{
soundObjects[gMusic].setVolume(gVolume);
}
soundObjects[gMusic].start(0,1000);
}
}
}
function changeVolume(myChangeVolume)
{
trace("changeVolume : " + myChangeVolume);
gVolume = Number(myChangeVolume);
if(gCommentOn !== undefined)
{
gCommentOn.setVolume(gVolume);
if(gMusicOn == 1)
{
soundObjects[gMusic].setVolume(gVolume * 0.4);
}
}
else if(gMusicOn == 1)
{
soundObjects[gMusic].setVolume(gVolume);
}
}
function DesactiveBZ()
{
BT_BZ.useHandCursor = false;
BT_BZ.gBZactif = 0;
}
function ActiveBZ()
{
BT_BZ.useHandCursor = true;
BT_BZ.gBZactif = 1;
}
function getSoundByID(attributeValue)
{
var _loc2_ = this.moduleInfo.filterNode(this.moduleInfo.returnNodeByPath("Resources.ResourcesZip"),"type","mp3");
mySound = undefined;
mySound = this.recusiveGetSoundByAttribute(_loc2_,"id",attributeValue);
if(mySound == undefined)
{
trace(attributeValue + " n\'existe pas dans XML");
}
return mySound;
}
function recusiveGetSoundByAttribute(node, attribute, attributeValue)
{
var _loc2_ = 0;
while(_loc2_ < node.childNodes.length)
{
if(node.childNodes[_loc2_].attributes[attribute] == attributeValue)
{
mySound = node.childNodes[_loc2_];
break;
}
if(node.childNodes[_loc2_].hasChildNodes())
{
this.recusiveGetSoundByAttribute(node.childNodes[_loc2_],attribute,attributeValue);
}
_loc2_ = _loc2_ + 1;
}
return mySound;
}
function gereCursor(myCursor)
{
switch(myCursor)
{
case -1:
case 1:
case "fleche":
lNum = 1;
lNumMobi = -1;
myCursor = "fleche";
break;
case 280:
case 2:
case "doigt":
lNum = 2;
lNumMobi = 280;
myCursor = "doigt";
break;
case 260:
case 3:
case "mainO":
lNumMobi = 260;
lNum = 3;
myCursor = "mainO";
break;
case 290:
case 4:
case "mainF":
lNum = 4;
lNumMobi = 290;
myCursor = "mainF";
break;
case 200:
case 0:
case "O":
lNum = 0;
lNumMobi = 200;
myCursor = "O";
}
trace("cursor " + myCursor);
if(gClipGen.gOnDir == 1)
{
_global.CURSEUR.Action(myCursor);
getURL("6",lNumMobi);
getURL("lingo:gerecursor(" + lNum + ")","");
}
else
{
_global.CURSEUR.Action(myCursor);
}
}
function ConvertCoord(mc_src, mc_dest)
{
var _loc1_ = {x:0,y:0};
mc_src.localToGlobal(_loc1_);
mc_dest.globalToLocal(_loc1_);
return _loc1_;
}
function activePause()
{
"active pause";
if(gCommentOn !== undefined)
{
gCommentOnPause = gCommentOn;
gCommentOnPause.p = gCommentOn.p;
xtrace("++++++++ " + gCommentOn.p);
gCommentOnPausePos = gCommentOn.position;
stopComment();
}
if(gListeBruitage !== undefined)
{
gListePosBruitage = [];
gListeBruitageP = [];
i = gListeBruitage.length - 1;
while(i >= 0)
{
var _loc1_ = gListePosBruitage.push[soundObjects[gBruitageName + gListeBruitage[i]].position];
gListeBruitageP.push[soundObjects[gBruitageName + gListeBruitage[i]].p];
stopBruitage(soundObjects[gBruitageName + gListeBruitage[i]].p);
i--;
}
}
if(gMusicOn)
{
gPosMusic = soundObjects[gMusic].position;
soundObjects[gMusic].stop();
}
}
function desactivePause()
{
if(gCommentOnPausePos !== undefined)
{
if(gCommentOnPause.duration / 1000 !== gCommentOnPausePos / 1000)
{
joueSon(gCommentOnPause.p);
}
gCommentOnPause = undefined;
gCommentOnPausePos = undefined;
}
if(gMusicOn)
{
if(soundObjects[gMusic].duration / 1000 == gPosMusic / 1000)
{
soundObjects[gMusic].start(0,2000);
}
else
{
soundObjects[gMusic].start(gPosMusic / 1000,2000);
}
gPosMusic = undefined;
}
}
function spacePause()
{
if(gPauseOn == undefined)
{
activePause();
gPauseOn = 1;
}
else
{
desactivePause();
gPauseOn = undefined;
}
}
function onlocalConfigLoaded(success)
{
if(success)
{
moduleXmlRoot = gModulePath + this.firstChild.attributes.src;
Main();
}
}
function Main()
{
this.moduleInfo = new prod.moteur_v1_0.V000_ChargementXML(this,moduleXmlRoot,moduleOnline);
}
function xmlLoaded()
{
_global.MCs.preloader.mc.onLoading(70);
initGen();
gModuleName = moduleInfo.returnNodeByPath("BackOffice").firstChild.attributes.id;
gCommentName = "S_" + gLangue + "_" + gModuleName + "_";
gBruitageName = "B_" + gModuleName + "_";
var _loc3_ = gModuleName.split("_");
gModuleNumber = Number(_loc3_[_loc3_.length - 1]);
mediaChargeur = new prod.moteur_v1_0.V002_ChargementMedias(this,this.moduleInfo,this.moduleOnline);
gereTextes = new prod.moteur_v1_0.V007_GereTextes(this.CIBLE,this.moduleInfo);
_global.afficheIB = gereTextes.afficheIB;
_global.afficheLM = gereTextes.afficheLM;
}
function mediaLoaded()
{
if(typeof mediaChargeur == "undefined")
{
OnlySoundExterneHack = setInterval(mediaLoaded,20);
}
else
{
soundObjects = mediaChargeur.returnSoundObject();
clearInterval(OnlySoundExterneHack);
initModule();
}
}
function initModule()
{
_global.MCs.preloader.mc.onLoading(90);
trace("_initModule() ________________________");
this.CIBLE.XmlStocker = this.XmlStocker;
this.CIBLE.swfStocker = this.swfStocker;
this.CIBLE.photoStocker = this.photoStocker;
this.CIBLE.moduleXmlRoot = this.moduleXmlRoot;
this.CIBLE.moduleInfo = this.moduleInfo;
this.CIBLE.ConvertCoord = _global.ConvertCoord = ConvertCoord;
this.CIBLE.gModuleName = this.gModuleName;
this.CIBLE.gCommentName = this.gCommentName;
this.CIBLE.gBruitageName = this.gBruitageName;
this.CIBLE.gModuleNumber = this.gModuleNumber;
this.CIBLE.mediaChargeur = this.mediaChargeur;
this.CIBLE.gereTextes = this.gereTextes;
this.CIBLE.soundObjects = this.soundObjects;
this.CIBLE.testeDebutCommentSpecial = testeDebutCommentSpecial;
this.CIBLE.testeFinCommentSpecial = testeFinCommentSpecial;
this.CIBLE.stopComment = stopComment;
this.CIBLE.joueSon = _global.joueSon = joueSon;
this.CIBLE.stopSon = stopSon;
this.CIBLE.commentFini = commentFini;
this.CIBLE.joueBruitage = _global.joueBruitage = joueBruitage;
this.CIBLE.stopBruitage = _global.stopBruitage = stopBruitage;
this.CIBLE.finBruitage = finBruitage;
this.CIBLE.getPos = getPos;
this.CIBLE.trouvePosMax = trouvePosMax;
this.CIBLE.duplicate = duplicate;
this.CIBLE.randomiseList = randomiseList;
this.CIBLE.returnNodeByPathRandomise = returnNodeByPathRandomise;
this.CIBLE.zapIntro = zapIntro;
this.CIBLE.removeZapIntro = removeZapIntro;
this.CIBLE.onMcOut = onMcOut;
this.CIBLE.onMcOver = onMcOver;
this.CIBLE.desactiveClip = desactiveClip;
this.CIBLE.afficheClipPos = afficheClipPos;
this.CIBLE.gimme2digits = gimme2digits;
this.CIBLE.randomValue = randomValue;
this.CIBLE.chercheDepthPlus = _global.chercheDepthPlus = chercheDepthPlus;
this.CIBLE.chercheDepthMoins = chercheDepthMoins;
this.CIBLE.changeST = changeST;
this.CIBLE.changeMusicOn = changeMusicOn;
this.CIBLE.changeVolume = changeVolume;
this.CIBLE.gereCursor = _global.gereCursor = gereCursor;
this.CIBLE.ChangeModule = _global.ChangeModule = ChangeModule;
this.CIBLE.xPauseOn = this.xPauseOn;
this.CIBLE.xPauseOff = this.xPauseOff;
_global.pauseComment = mx.utils.Delegate.create(this.CIBLE,this.pauseComment);
_global.continueComment = mx.utils.Delegate.create(this.CIBLE,this.continueComment);
this.CIBLE.gLangue = gLangue;
this.CIBLE.gMusicOn = gMusicOn;
this.CIBLE.gSousTitre = gSousTitre;
this.CIBLE.gST = gST;
this.CIBLE.gVolume = gVolume;
this.CIBLE.gWidth = gWidth;
this.CIBLE.gHeight = gHeight;
initVariables();
}
function initInterfaceBZ()
{
gNiveau = 0;
Interface = Interface["A_" + gModuleName + "_interface"];
Interface.gotoAndPlay("E3");
Interface._visible = 1;
_global.BT_BZ = Interface.BT_BZ;
_global.BT_NIV = Interface.BT_NIV;
_global.BT_SOM = Interface.BT_SOM;
BT_NIV._visible = 0;
}
function goChoixNiveau()
{
coupeAnim._visible = false;
BT_NIV._visible = 0;
gNextLabel == undefined;
gNiveau = undefined;
stopComment();
gotoAndStop("NIVEAUX");
BT_BZ.gBZactif = 1;
}
function playConsignes()
{
DesactiveBZ();
if(gNiveau == undefined)
{
_global.joueSon({nomSon:"0b_bz",actionFin:"ActiveBZ"});
}
else
{
_global.joueSon({nomSon:gNiveau + "b_bz",actionFin:"ActiveBZ"});
}
}
function getKeyPressed()
{
var _loc1_ = undefined;
var _loc0_ = null;
if((_loc0_ = Key.getAscii()) !== 32)
{
_loc1_ = chr(Key.getAscii());
}
else
{
_loc1_ = "SPACE";
pauseTout();
}
return _loc1_;
}
function initListeQuestions()
{
var _loc2_ = [];
var _loc1_ = 1;
while(_loc1_ <= gNbQuestionsTotal)
{
_loc2_.push(_loc1_);
_loc1_ = _loc1_ + 1;
}
if(getKeyPressed() == 1)
{
gListeQuestionsTotal = _loc2_;
}
else if(getKeyPressed() == 2)
{
gListeQuestionsTotal = [2,8,9,13,15,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,39,40];
}
else
{
gListeQuestionsTotal = randomiseList(_loc2_);
}
trace(gListeQuestionsTotal);
gListeQuestions = gListeQuestionsTotal.slice(0,gNbQuestions);
}
function finCommentIntro()
{
initListeQuestions();
anim_P._visible = 0;
gQuestion = 1;
gScore = 0;
gNoQuestion = gListeQuestions[0];
gListeQuestionTirage = duplicate(gListeQuestions);
gotoAndStop("quiz");
}
function initVariables_QZZ()
{
gereTextes.afficheLM({codeLM:"LM90"});
gereTextes.afficheLM({codeLM:"LM91"});
gTempoRepOk = moduleInfo.returnNodeByPath("Module.Config.TempoMontreBonneReponse").firstChild.nodeValue;
if(gTempoRepOk !== undefined)
{
gTempoRepOk = Number(gTempoRepOk);
}
gNbQuestions = Number(moduleInfo.returnNodeByPath("Module.Config.Serie").firstChild.nodeValue);
gNbQuestionsTotal = [];
var _loc3_ = this.moduleInfo.returnNodeByPath("Module." + gLangue + ".LegendesMedias");
i = 1;
while(i < 1000)
{
var _loc2_ = gereTextes.getTextById(_loc3_,"LM_Q" + gimme2digits(i));
if(_loc2_ == undefined)
{
break;
}
i++;
}
gNbQuestionsTotal = i - 1;
trace(" %%%%%%%%%%%%%%%%%%%%%%%%%%%% " + gNbQuestionsTotal);
this.photoStocker.swapDepths(300);
gQuizFini = 0;
gScore = 0;
if(soundObjects[gCommentName + "00"] !== undefined)
{
joueSon({nomSon:"00",actionFin:"finCommentIntro"});
anim_P = swfStocker["A_" + gModuleName + "_BG_QUIZ"];
if(anim_P !== undefined)
{
afficheClipPos(anim_P,100,150);
}
}
else
{
finCommentIntro();
}
}
function findID(myID)
{
lBoucle = 0;
var _loc2_ = moduleInfo.returnNodeByPath("Module.Config.Bruitage_Boucle");
var _loc1_ = 0;
while(_loc1_ < _loc2_.childNodes.length)
{
if(_loc2_.childNodes[_loc1_].attributes.id == myID)
{
lBoucle = 1;
break;
}
_loc1_ = _loc1_ + 1;
}
return lBoucle;
}
this._lockroot = 1;
_global._MOD_ = this;
this.CIBLE = this;
_global.xtraceGroups = [];
xtraceGroups.tous = 1;
xtraceGroups.doc = 1;
xtraceGroups.debug = 0;
xtraceGroups.route = 0;
xtraceGroups.error = 0;
_global.xtrace = xtrace;
_global.xtrace_raz = xtrace_raz;
_global.xlisteObj = xlisteObj;
_global.xtrace_mode = _global.xtrace_mode != undefined ? _global.xtrace_mode : "off";
_global.xlisteObj_mode = _global.xlisteObj_mode != undefined ? _global.xlisteObj_mode : "off";
this.ChargeMoteur = function(p)
{
this.initVariables();
};
trace("XLIBBB");
this.ChargeMoteur = function(p)
{
trace("Charge Moteur xlib");
this.initVariables();
};
_global.LMaVider = new Array();
_global.LMaVider2 = new Array();
_global.InitMC = InitMC;
_global.InitMC_standart = InitMC_standart;
_global.InitMC_BTN = InitMC_BTN;
_global.InitMC_dragdrop = InitMC_dragdrop;
_global.InitMC_slider = InitMC_slider;
_global.InitMC_titre = InitMC_titre;
_global.IncString = IncString;
_global.DecString = DecString;
_global.GetFilePath = GetFilePath;
_global.AntiSlashToSlash = AntiSlashToSlash;
_global.str_replace = str_replace;
_global.JoindreObjets = JoindreObjets;
_global.xGetConfig = xGetConfig;
_global.GetOriginalSize = GetOriginalSize;
_global.GetOriginalHeight = GetOriginalHeight;
_global.CreerCache = CreerCache;
_global.ConvertCoord = ConvertCoord;
_global.getGlobalCoord = getGlobalCoord;
_global.getLocalCoord = getLocalCoord;
_global.length_ass = length_ass;
_global.ExplodeString = ExplodeString;
_global.BloquerActives = BloquerActives;
_global.DebloquerActives = DebloquerActives;
_global.afficheLM_x = afficheLM_x;
_global.viderLM_x = viderLM_x;
_global.afficheLM_x2 = afficheLM_x2;
_global.viderLM_x2 = viderLM_x2;
_global.stopComment = stopComment;
_global.joueSon = joueSon;
_root.creerClicZap = creerClicZap;
_global.gimme2digits = gimme2digits;
this.randRange = randomValue;
_global.chercheDepthPlus = chercheDepthPlus;
_global.chercheDepthMoins = chercheDepthMoins;
_global.DesactiveBZ = DesactiveBZ;
_root.DesactiveBZ = DesactiveBZ;
_global.ActiveBZ = ActiveBZ;
_root.ActiveBZ = ActiveBZ;
this.xPauseOn = function()
{
trace("xPauseOn " + this + " " + _global.pauseComment);
_global.pauseComment();
this.moteur.PauseMCs = [];
this.moteur.xPause_rec({clipref:_root});
};
this.xPauseOff = function()
{
trace("xPauseOff " + this);
this.moteur.PauseDesactive();
_global.continueComment();
};
this.PAUSEINTFUNC = function()
{
var _loc3_ = getTimer();
if(_loc3_ - this.firstTime >= 100)
{
clearInterval(this.PAUSEINT);
this.xPause_rec2({clipref:_root});
}
};
this.xPause_rec = function(p)
{
for(prop in p.clipref)
{
if(typeof p.clipref[prop] == "movieclip" && p.clipref[prop] != _root && p.clipref[prop].NoPause != true)
{
p.clipref[prop].DetectFrameFirst = p.clipref[prop]._currentframe;
this.xPause_rec({clipref:p.clipref[prop]});
}
}
if(p.clipref == _root)
{
this.firstTime = getTimer();
this.PAUSEINT = setInterval(this,"PAUSEINTFUNC",10);
}
};
this.xPause_rec2 = function(p)
{
for(prop in p.clipref)
{
if(typeof p.clipref[prop] == "movieclip" && p.clipref[prop] != _root && p.clipref[prop].NoPause != true)
{
p.clipref[prop].DetectFrameLast = p.clipref[prop]._currentframe;
if(p.clipref[prop].DetectFrameLast != p.clipref[prop].DetectFrameFirst)
{
this.PauseMCs.push(p.clipref[prop]);
}
this.xPause_rec2({clipref:p.clipref[prop]});
}
}
if(p.clipref == _root)
{
this.PauseActive();
}
};
this.PauseActive = function()
{
trace("PAUSEACTIVE " + this.PauseMCs.length);
for(prop in this.PauseMCs)
{
trace(this.PauseMCs[prop]);
this.PauseMCs[prop].stop();
}
};
this.PauseDesactive = function()
{
trace("PAUSEDESACTIVE " + this.PauseMCs.length);
for(prop in this.PauseMCs)
{
trace(this.PauseMCs[prop]);
this.PauseMCs[prop].play();
}
};
stop();
_global._MOD_ = this;
trace("MOTEUR");
this.ChargeMoteur = function(p)
{
trace("_ChargeMoteur()");
if(gModulePath == undefined)
{
gModulePath = "";
}
if(!moduleOnline)
{
this.XmlStocker = new XML();
this.XmlStocker.ignoreWhite = true;
this.XmlStocker.load(gModulePath + "localConfig.xml");
this.XmlStocker.onLoad = onlocalConfigLoaded;
}
else
{
Main();
}
};
_global.xtrace_mode = "on";
_global.xlisteObj_mode = "on";
this.initVariables = function()
{
this.gotoAndStop("INIT");
trace({mess:"- execution du code de prod/module/init.as",group:"doc"});
trace("init.as");
};
this.Init = function()
{
this.ChargeMoteur();
};
this.InitOk = function()
{
trace("InitOk");
if(HOTE == undefined)
{
this.Start();
}
else
{
HOTE.InitFin(this);
}
};
this.Start = function()
{
gereCursor("fleche");
this.gotoAndStop("START");
trace("start.as");
};
if(HOTE == undefined)
{
this.onEnterFrame = function()
{
var _loc2_ = this.getBytesLoaded();
var _loc3_ = this.getBytesTotal();
if(_loc2_ >= _loc3_)
{
this.Init();
delete this.onEnterFrame;
}
};
}
stop();
_global.flagRetourMiniQuiz = true;
var clickBoutonretour = false;
texte_NoQuestion.text = "";
stop();
StopAll = function()
{
trace("STOP--->");
if(clickBoutonretour == false)
{
_global.flagRetourMiniQuiz = false;
}
};
stop();
i = 1;
while(i < 6)
{
this["texte_LMR" + gimme2digits(i)]._visible = 0;
i++;
}
this.texte_LMQ._visible = 0;
BT_FERMERQUIZ.onRollOver = function()
{
this.useHandCursor = true;
gereTextes.afficheIB({codeIB:"IB93",mc:this});
this.gotoAndPlay("E2");
};
BT_FERMERQUIZ.onPress = function()
{
clickBoutonretour = true;
ChangeModule({codeRub:"DCV",numMod:0});
};
BT_FERMERQUIZ.onRollOut = function()
{
gereTextes.masqueIB();
this.gotoAndPlay("E1");
};
stop();